<%
   response.setHeader("Content-disposition","attachment; filename=sheet1.xls");
%>
<%@ taglib uri="/WEB-INF/eam-tag.tld" prefix="eam" %>
<%@ page import="com.sbdcpn.page.utils.RequestUtil,
				 com.sbdcpn.business.wzmis.base.ProcessesRationTotalBO,
				 java.util.List,
				 java.text.DecimalFormat,
				 java.util.Map" %>
<%/*---设置字符集---*/%>
<eam:PageLanguage />
<%/*---设置字符集---*/%>
<%
	String total_date = RequestUtil.getStringParameter(request ,"total_date" ,"");
	String processes_id = RequestUtil.getStringParameter(request ,"processes_id" ,"");
	List dataList = ProcessesRationTotalBO.query(total_date, processes_id);
%>
<HTML xmlns:x="urn:schemas-microsoft-com:office:excel">
<HEAD>
	<TITLE><eam:message key="title.processes_ration_total"/></TITLE>
	<script src="<%=CONTEXTPATH%>/utility/class/cutil.js"></script>
	<style>
	td.gridHead{
		text-align: center;
		font-size: 9pt;
	}
	tr.gridData{
		font-size: 9pt;
	}
	</style>
</HEAD>
<BODY>
	<TABLE class="gridTbl" width="800">
	  <tr><td></td></tr>
	</TABLE>
	<table class="gridTbl" width="1810">
		<tr>
			<td colspan="15" bgcolor="#ffffff" align="center">
				<b>
					<font size="3" font-family="楷体_gb2312" color="black">
					<eam:message key="title.processes_ration_total"/>
					</font>
				</b>
			</td>
		</tr>
		<tr><td>&nbsp;</td></tr>
	</table>
	<table id="tab" class="gridTbl" border="1">
	<thead>
		<tr class="gridHead">
			<td width="20" class="gridHead">No.</td>
			<td class="gridHead" width=80>
				<eam:message key="column.processes_ration_total.processes_ration_total.total_date" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.processes_code" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.processes_name" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.statdept_name" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.material_code" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.material_name" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.material_style" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.material_standard" />
			</td>
			<td class="gridHead" width=150>
				<eam:message key="column.processes_ration_total.processes_ration_total.material_unit" />
			</td>
			<td class="gridHead" width=100>
				<eam:message key="column.processes_ration_total.processes_ration_total.consume_value" />
			</td>
			<td class="gridHead" width=80>
				<eam:message key="column.processes_ration_total.processes_ration_total.month_used_value" />
			</td>
			<td class="gridHead" width=100>
				<eam:message key="column.processes_ration_total.processes_ration_total.year_used_value" />
			</td>
			<td class="gridHead" width=125>
				<eam:message key="column.processes_ration_total.processes_ration_total.over_value" />
			</td>
			<td class="gridHead" width=125>
				<eam:message key="column.processes_ration_total.processes_ration_total.over_value_pec" />
			</td>
		</thead>
		<tbody>
<%
		if (dataList != null){
			for(int i = 0; i < dataList.size(); i++){
				Map dataMap = (Map)dataList.get(i);
%>
			<tr>
				<td class="gridHead" align="center" x:str><%= (i+1)%></td>
				<td align="center" x:str><%= dataMap.get("total_date")%></td>
				<td align="left" x:str><%= dataMap.get("processes_code")%></td>
				<td align="left" x:str><%= dataMap.get("processes_name")%></td>
				<td align="left" x:str><%= dataMap.get("statdept_name")%></td>
				<td align="left" x:str><%= dataMap.get("material_code")%></td>
				<td align="left" x:str><%= dataMap.get("material_name")%></td>
				<td align="left" x:str><%= dataMap.get("material_style")%></td>
				<td align="left" x:str><%= dataMap.get("material_standard")%></td>
				<td align="left" x:str><%= dataMap.get("material_unit")%></td>
				<td align="right" x:str><%= dataMap.get("consume_value")%></td>
				<td align="right" x:str><%= dataMap.get("month_used_value")%></td>
				<td align="right" x:str><%= dataMap.get("year_used_value")%></td>
				<td align="right" x:str><%= dataMap.get("over_value")%></td>
				<td align="right" x:str><%= dataMap.get("over_value_pec")%></td>
			</tr>
<%
			}
		}
%>
		</tbody>
	</table>
<!-- /sbdhtc:datagrid-->
</BODY>
</HTML>
